package com.kj.xuyuan.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kj.xuyuan.R;
import com.kj.xuyuan.model.ChargeHistoryBean;

import java.util.List;

import androidx.annotation.Nullable;

public class ChargeHistoryAdapter extends BaseQuickAdapter<ChargeHistoryBean, BaseViewHolder> {

    public ChargeHistoryAdapter() {
        super(R.layout.item_consume_history);
    }

    @Override
    protected void convert(BaseViewHolder helper, ChargeHistoryBean item) {
        helper.setText(R.id.tv_title,item.getMemo());
        helper.setText(R.id.tv_time,item.getCreatetime());
        helper.setText(R.id.tv_money,(item.getType() == 1 ? "+" : "-")+item.getScore());
    }
}
